<template>
    <header class="header">
        <h1>备忘录</h1>
        <input v-model="val" @keyup.enter="handVal" class="new-todo" placeholder="请输入您将要做的事情" autofocus>
    </header>
</template>

<script>
export default {
    data() {
        return {
           val:"" 
        }
    },
    methods: {
        handVal(){
            this.$emit("conent",this.val)
            this.val=""
        }
    },
}
</script>

<style>

</style>